home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1991-10-14 | 9.1 KB | [TEXT/MPS ] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: main.c
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MPS ] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 6d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..main.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 21 98 00 | 00 01 ac a5 20 07 c0 a5 |.....!..|.... ...|
|00000060| 20 07 c0 00 00 00 00 00 | 00 00 00 00 00 00 00 00 | .......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ff 2b 00 00 |........|.....+..|
|00000080| 2f 2a 0d 20 2a 20 43 6f | 70 79 72 69 67 68 74 20 |/*. * Co|pyright |
|00000090| 28 63 29 20 31 39 38 39 | 20 54 68 65 20 52 65 67 |(c) 1989| The Reg|
|000000a0| 65 6e 74 73 20 6f 66 20 | 74 68 65 20 55 6e 69 76 |ents of |the Univ|
|000000b0| 65 72 73 69 74 79 20 6f | 66 20 43 61 6c 69 66 6f |ersity o|f Califo|
|000000c0| 72 6e 69 61 2e 0d 20 2a | 20 41 6c 6c 20 72 69 67 |rnia.. *| All rig|
|000000d0| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0d 20 2a |hts rese|rved.. *|
|000000e0| 0d 20 2a 20 54 68 69 73 | 20 63 6f 64 65 20 69 73 |. * This| code is|
|000000f0| 20 64 65 72 69 76 65 64 | 20 66 72 6f 6d 20 73 6f | derived| from so|
|00000100| 66 74 77 61 72 65 20 63 | 6f 6e 74 72 69 62 75 74 |ftware c|ontribut|
|00000110| 65 64 20 74 6f 20 42 65 | 72 6b 65 6c 65 79 20 62 |ed to Be|rkeley b|
|00000120| 79 0d 20 2a 20 52 6f 62 | 65 72 74 20 50 61 75 6c |y. * Rob|ert Paul|
|00000130| 20 43 6f 72 62 65 74 74 | 2e 0d 20 2a 0d 20 2a 20 | Corbett|.. *. * |
|00000140| 52 65 64 69 73 74 72 69 | 62 75 74 69 6f 6e 20 61 |Redistri|bution a|
|00000150| 6e 64 20 75 73 65 20 69 | 6e 20 73 6f 75 72 63 65 |nd use i|n source|
|00000160| 20 61 6e 64 20 62 69 6e | 61 72 79 20 66 6f 72 6d | and bin|ary form|
|00000170| 73 2c 20 77 69 74 68 20 | 6f 72 20 77 69 74 68 6f |s, with |or witho|
|00000180| 75 74 0d 20 2a 20 6d 6f | 64 69 66 69 63 61 74 69 |ut. * mo|dificati|
|00000190| 6f 6e 2c 20 61 72 65 20 | 70 65 72 6d 69 74 74 65 |on, are |permitte|
|000001a0| 64 20 70 72 6f 76 69 64 | 65 64 20 74 68 61 74 20 |d provid|ed that |
|000001b0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 63 6f |the foll|owing co|
|000001c0| 6e 64 69 74 69 6f 6e 73 | 0d 20 2a 20 61 72 65 20 |nditions|. * are |
|000001d0| 6d 65 74 3a 0d 20 2a 20 | 31 2e 20 52 65 64 69 73 |met:. * |1. Redis|
|000001e0| 74 72 69 62 75 74 69 6f | 6e 73 20 6f 66 20 73 6f |tributio|ns of so|
|000001f0| 75 72 63 65 20 63 6f 64 | 65 20 6d 75 73 74 20 72 |urce cod|e must r|
|00000200| 65 74 61 69 6e 20 74 68 | 65 20 61 62 6f 76 65 20 |etain th|e above |
|00000210| 63 6f 70 79 72 69 67 68 | 74 0d 20 2a 20 20 20 20 |copyrigh|t. * |
|00000220| 6e 6f 74 69 63 65 2c 20 | 74 68 69 73 20 6c 69 73 |notice, |this lis|
|00000230| 74 20 6f 66 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 |t of con|ditions |
|00000240| 61 6e 64 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |and the |followin|
|00000250| 67 20 64 69 73 63 6c 61 | 69 6d 65 72 2e 0d 20 2a |g discla|imer.. *|
|00000260| 20 32 2e 20 52 65 64 69 | 73 74 72 69 62 75 74 69 | 2. Redi|stributi|
|00000270| 6f 6e 73 20 69 6e 20 62 | 69 6e 61 72 79 20 66 6f |ons in b|inary fo|
|00000280| 72 6d 20 6d 75 73 74 20 | 72 65 70 72 6f 64 75 63 |rm must |reproduc|
|00000290| 65 20 74 68 65 20 61 62 | 6f 76 65 20 63 6f 70 79 |e the ab|ove copy|
|000002a0| 72 69 67 68 74 0d 20 2a | 20 20 20 20 6e 6f 74 69 |right. *| noti|
|000002b0| 63 65 2c 20 74 68 69 73 | 20 6c 69 73 74 20 6f 66 |ce, this| list of|
|000002c0| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 61 6e 64 20 | conditi|ons and |
|000002d0| 74 68 65 20 66 6f 6c 6c | 6f 77 69 6e 67 20 64 69 |the foll|owing di|
|000002e0| 73 63 6c 61 69 6d 65 72 | 20 69 6e 20 74 68 65 0d |sclaimer| in the.|
|000002f0| 20 2a 20 20 20 20 64 6f | 63 75 6d 65 6e 74 61 74 | * do|cumentat|
|00000300| 69 6f 6e 20 61 6e 64 2f | 6f 72 20 6f 74 68 65 72 |ion and/|or other|
|00000310| 20 6d 61 74 65 72 69 61 | 6c 73 20 70 72 6f 76 69 | materia|ls provi|
|00000320| 64 65 64 20 77 69 74 68 | 20 74 68 65 20 64 69 73 |ded with| the dis|
|00000330| 74 72 69 62 75 74 69 6f | 6e 2e 0d 20 2a 20 33 2e |tributio|n.. * 3.|
|00000340| 20 41 6c 6c 20 61 64 76 | 65 72 74 69 73 69 6e 67 | All adv|ertising|
|00000350| 20 6d 61 74 65 72 69 61 | 6c 73 20 6d 65 6e 74 69 | materia|ls menti|
|00000360| 6f 6e 69 6e 67 20 66 65 | 61 74 75 72 65 73 20 6f |oning fe|atures o|
|00000370| 72 20 75 73 65 20 6f 66 | 20 74 68 69 73 20 73 6f |r use of| this so|
|00000380| 66 74 77 61 72 65 0d 20 | 2a 20 20 20 20 6d 75 73 |ftware. |* mus|
|00000390| 74 20 64 69 73 70 6c 61 | 79 20 74 68 65 20 66 6f |t displa|y the fo|
|000003a0| 6c 6c 6f 77 69 6e 67 20 | 61 63 6b 6e 6f 77 6c 65 |llowing |acknowle|
|000003b0| 64 67 65 6d 65 6e 74 3a | 0d 20 2a 09 54 68 69 73 |dgement:|. *.This|
|000003c0| 20 70 72 6f 64 75 63 74 | 20 69 6e 63 6c 75 64 65 | product| include|
|000003d0| 73 20 73 6f 66 74 77 61 | 72 65 20 64 65 76 65 6c |s softwa|re devel|
|000003e0| 6f 70 65 64 20 62 79 20 | 74 68 65 20 55 6e 69 76 |oped by |the Univ|
|000003f0| 65 72 73 69 74 79 20 6f | 66 0d 20 2a 09 43 61 6c |ersity o|f. *.Cal|
|00000400| 69 66 6f 72 6e 69 61 2c | 20 42 65 72 6b 65 6c 65 |ifornia,| Berkele|
|00000410| 79 20 61 6e 64 20 69 74 | 73 20 63 6f 6e 74 72 69 |y and it|s contri|
|00000420| 62 75 74 6f 72 73 2e 0d | 20 2a 20 34 2e 20 4e 65 |butors..| * 4. Ne|
|00000430| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|00000440| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|00000450| 20 6e 6f 72 20 74 68 65 | 20 6e 61 6d 65 73 20 6f | nor the| names o|
|00000460| 66 20 69 74 73 20 63 6f | 6e 74 72 69 62 75 74 6f |f its co|ntributo|
|00000470| 72 73 0d 20 2a 20 20 20 | 20 6d 61 79 20 62 65 20 |rs. * | may be |
|00000480| 75 73 65 64 20 74 6f 20 | 65 6e 64 6f 72 73 65 20 |used to |endorse |
|00000490| 6f 72 20 70 72 6f 6d 6f | 74 65 20 70 72 6f 64 75 |or promo|te produ|
|000004a0| 63 74 73 20 64 65 72 69 | 76 65 64 20 66 72 6f 6d |cts deri|ved from|
|000004b0| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 0d 20 | this so|ftware. |
|000004c0| 2a 20 20 20 20 77 69 74 | 68 6f 75 74 20 73 70 65 |* wit|hout spe|
|000004d0| 63 69 66 69 63 20 70 72 | 69 6f 72 20 77 72 69 74 |cific pr|ior writ|
|000004e0| 74 65 6e 20 70 65 72 6d | 69 73 73 69 6f 6e 2e 0d |ten perm|ission..|
|000004f0| 20 2a 0d 20 2a 20 54 48 | 49 53 20 53 4f 46 54 57 | *. * TH|IS SOFTW|
|00000500| 41 52 45 20 49 53 20 50 | 52 4f 56 49 44 45 44 20 |ARE IS P|ROVIDED |
|00000510| 42 59 20 54 48 45 20 52 | 45 47 45 4e 54 53 20 41 |BY THE R|EGENTS A|
|00000520| 4e 44 20 43 4f 4e 54 52 | 49 42 55 54 4f 52 53 20 |ND CONTR|IBUTORS |
|00000530| 60 60 41 53 20 49 53 27 | 27 20 41 4e 44 0d 20 2a |``AS IS'|' AND. *|
|00000540| 20 41 4e 59 20 45 58 50 | 52 45 53 53 20 4f 52 20 | ANY EXP|RESS OR |
|00000550| 49 4d 50 4c 49 45 44 20 | 57 41 52 52 41 4e 54 49 |IMPLIED |WARRANTI|
|00000560| 45 53 2c 20 49 4e 43 4c | 55 44 49 4e 47 2c 20 42 |ES, INCL|UDING, B|
|00000570| 55 54 20 4e 4f 54 20 4c | 49 4d 49 54 45 44 20 54 |UT NOT L|IMITED T|
|00000580| 4f 2c 20 54 48 45 0d 20 | 2a 20 49 4d 50 4c 49 45 |O, THE. |* IMPLIE|
|00000590| 44 20 57 41 52 52 41 4e | 54 49 45 53 20 4f 46 20 |D WARRAN|TIES OF |
|000005a0| 4d 45 52 43 48 41 4e 54 | 41 42 49 4c 49 54 59 20 |MERCHANT|ABILITY |
|000005b0| 41 4e 44 20 46 49 54 4e | 45 53 53 20 46 4f 52 20 |AND FITN|ESS FOR |
|000005c0| 41 20 50 41 52 54 49 43 | 55 4c 41 52 20 50 55 52 |A PARTIC|ULAR PUR|
|000005d0| 50 4f 53 45 0d 20 2a 20 | 41 52 45 20 44 49 53 43 |POSE. * |ARE DISC|
|000005e0| 4c 41 49 4d 45 44 2e 20 | 20 49 4e 20 4e 4f 20 45 |LAIMED. | IN NO E|
|000005f0| 56 45 4e 54 20 53 48 41 | 4c 4c 20 54 48 45 20 52 |VENT SHA|LL THE R|
|00000600| 45 47 45 4e 54 53 20 4f | 52 20 43 4f 4e 54 52 49 |EGENTS O|R CONTRI|
|00000610| 42 55 54 4f 52 53 20 42 | 45 20 4c 49 41 42 4c 45 |BUTORS B|E LIABLE|
|00000620| 0d 20 2a 20 46 4f 52 20 | 41 4e 59 20 44 49 52 45 |. * FOR |ANY DIRE|
|00000630| 43 54 2c 20 49 4e 44 49 | 52 45 43 54 2c 20 49 4e |CT, INDI|RECT, IN|
|00000640| 43 49 44 45 4e 54 41 4c | 2c 20 53 50 45 43 49 41 |CIDENTAL|, SPECIA|
|00000650| 4c 2c 20 45 58 45 4d 50 | 4c 41 52 59 2c 20 4f 52 |L, EXEMP|LARY, OR|
|00000660| 20 43 4f 4e 53 45 51 55 | 45 4e 54 49 41 4c 0d 20 | CONSEQU|ENTIAL. |
|00000670| 2a 20 44 41 4d 41 47 45 | 53 20 28 49 4e 43 4c 55 |* DAMAGE|S (INCLU|
|00000680| 44 49 4e 47 2c 20 42 55 | 54 20 4e 4f 54 20 4c 49 |DING, BU|T NOT LI|
|00000690| 4d 49 54 45 44 20 54 4f | 2c 20 50 52 4f 43 55 52 |MITED TO|, PROCUR|
|000006a0| 45 4d 45 4e 54 20 4f 46 | 20 53 55 42 53 54 49 54 |EMENT OF| SUBSTIT|
|000006b0| 55 54 45 20 47 4f 4f 44 | 53 0d 20 2a 20 4f 52 20 |UTE GOOD|S. * OR |
|000006c0| 53 45 52 56 49 43 45 53 | 3b 20 4c 4f 53 53 20 4f |SERVICES|; LOSS O|
|000006d0| 46 20 55 53 45 2c 20 44 | 41 54 41 2c 20 4f 52 20 |F USE, D|ATA, OR |
|000006e0| 50 52 4f 46 49 54 53 3b | 20 4f 52 20 42 55 53 49 |PROFITS;| OR BUSI|
|000006f0| 4e 45 53 53 20 49 4e 54 | 45 52 52 55 50 54 49 4f |NESS INT|ERRUPTIO|
|00000700| 4e 29 0d 20 2a 20 48 4f | 57 45 56 45 52 20 43 41 |N). * HO|WEVER CA|
|00000710| 55 53 45 44 20 41 4e 44 | 20 4f 4e 20 41 4e 59 20 |USED AND| ON ANY |
|00000720| 54 48 45 4f 52 59 20 4f | 46 20 4c 49 41 42 49 4c |THEORY O|F LIABIL|
|00000730| 49 54 59 2c 20 57 48 45 | 54 48 45 52 20 49 4e 20 |ITY, WHE|THER IN |
|00000740| 43 4f 4e 54 52 41 43 54 | 2c 20 53 54 52 49 43 54 |CONTRACT|, STRICT|
|00000750| 0d 20 2a 20 4c 49 41 42 | 49 4c 49 54 59 2c 20 4f |. * LIAB|ILITY, O|
|00000760| 52 20 54 4f 52 54 20 28 | 49 4e 43 4c 55 44 49 4e |R TORT (|INCLUDIN|
|00000770| 47 20 4e 45 47 4c 49 47 | 45 4e 43 45 20 4f 52 20 |G NEGLIG|ENCE OR |
|00000780| 4f 54 48 45 52 57 49 53 | 45 29 20 41 52 49 53 49 |OTHERWIS|E) ARISI|
|00000790| 4e 47 20 49 4e 20 41 4e | 59 20 57 41 59 0d 20 2a |NG IN AN|Y WAY. *|
|000007a0| 20 4f 55 54 20 4f 46 20 | 54 48 45 20 55 53 45 20 | OUT OF |THE USE |
|000007b0| 4f 46 20 54 48 49 53 20 | 53 4f 46 54 57 41 52 45 |OF THIS |SOFTWARE|
|000007c0| 2c 20 45 56 45 4e 20 49 | 46 20 41 44 56 49 53 45 |, EVEN I|F ADVISE|
|000007d0| 44 20 4f 46 20 54 48 45 | 20 50 4f 53 53 49 42 49 |D OF THE| POSSIBI|
|000007e0| 4c 49 54 59 20 4f 46 0d | 20 2a 20 53 55 43 48 20 |LITY OF.| * SUCH |
|000007f0| 44 41 4d 41 47 45 2e 0d | 20 2a 2f 0d 0d 23 69 66 |DAMAGE..| */..#if|
|00000800| 6e 64 65 66 20 6c 69 6e | 74 0d 63 68 61 72 20 63 |ndef lin|t.char c|
|00000810| 6f 70 79 72 69 67 68 74 | 5b 5d 20 3d 0d 22 40 28 |opyright|[] =."@(|
|00000820| 23 29 20 43 6f 70 79 72 | 69 67 68 74 20 28 63 29 |#) Copyr|ight (c)|
|00000830| 20 31 39 38 39 20 54 68 | 65 20 52 65 67 65 6e 74 | 1989 Th|e Regent|
|00000840| 73 20 6f 66 20 74 68 65 | 20 55 6e 69 76 65 72 73 |s of the| Univers|
|00000850| 69 74 79 20 6f 66 20 43 | 61 6c 69 66 6f 72 6e 69 |ity of C|aliforni|
|00000860| 61 2e 5c 6e 5c 0d 20 41 | 6c 6c 20 72 69 67 68 74 |a.\n\. A|ll right|
|00000870| 73 20 72 65 73 65 72 76 | 65 64 2e 5c 6e 22 3b 0d |s reserv|ed.\n";.|
|00000880| 23 65 6e 64 69 66 20 2f | 2a 20 6e 6f 74 20 6c 69 |#endif /|* not li|
|00000890| 6e 74 20 2a 2f 0d 0d 23 | 69 66 6e 64 65 66 20 6c |nt */..#|ifndef l|
|000008a0| 69 6e 74 0d 73 74 61 74 | 69 63 20 63 68 61 72 20 |int.stat|ic char |
|000008b0| 73 63 63 73 69 64 5b 5d | 20 3d 20 22 40 28 23 29 |sccsid[]| = "@(#)|
|000008c0| 6d 61 69 6e 2e 63 09 35 | 2e 34 20 28 42 65 72 6b |main.c.5|.4 (Berk|
|000008d0| 65 6c 65 79 29 20 32 2f | 32 36 2f 39 31 22 3b 0d |eley) 2/|26/91";.|
|000008e0| 23 65 6e 64 69 66 20 2f | 2a 20 6e 6f 74 20 6c 69 |#endif /|* not li|
|000008f0| 6e 74 20 2a 2f 0d 0d 23 | 69 6e 63 6c 75 64 65 20 |nt */..#|include |
|00000900| 3c 73 69 67 6e 61 6c 2e | 68 3e 0d 23 69 6e 63 6c |<signal.|h>.#incl|
|00000910| 75 64 65 20 22 64 65 66 | 73 2e 68 22 0d 0d 63 68 |ude "def|s.h"..ch|
|00000920| 61 72 20 64 66 6c 61 67 | 3b 0d 63 68 61 72 20 6c |ar dflag|;.char l|
|00000930| 66 6c 61 67 3b 0d 63 68 | 61 72 20 72 66 6c 61 67 |flag;.ch|ar rflag|
|00000940| 3b 0d 63 68 61 72 20 74 | 66 6c 61 67 3b 0d 63 68 |;.char t|flag;.ch|
|00000950| 61 72 20 76 66 6c 61 67 | 3b 0d 0d 63 68 61 72 20 |ar vflag|;..char |
|00000960| 2a 66 69 6c 65 5f 70 72 | 65 66 69 78 20 3d 20 22 |*file_pr|efix = "|
|00000970| 79 22 3b 0d 63 68 61 72 | 20 2a 6d 79 6e 61 6d 65 |y";.char| *myname|
|00000980| 20 3d 20 22 79 61 63 63 | 22 3b 0d 63 68 61 72 20 | = "yacc|";.char |
|00000990| 2a 74 65 6d 70 5f 66 6f | 72 6d 20 3d 20 22 79 61 |*temp_fo|rm = "ya|
|000009a0| 63 63 2e 58 58 58 58 58 | 58 58 22 3b 0d 0d 69 6e |cc.XXXXX|XX";..in|
|000009b0| 74 20 6c 69 6e 65 6e 6f | 3b 0d 69 6e 74 20 6f 75 |t lineno|;.int ou|
|000009c0| 74 6c 69 6e 65 3b 0d 0d | 63 68 61 72 20 2a 61 63 |tline;..|char *ac|
|000009d0| 74 69 6f 6e 5f 66 69 6c | 65 5f 6e 61 6d 65 3b 0d |tion_fil|e_name;.|
|000009e0| 63 68 61 72 20 2a 63 6f | 64 65 5f 66 69 6c 65 5f |char *co|de_file_|
|000009f0| 6e 61 6d 65 3b 0d 63 68 | 61 72 20 2a 64 65 66 69 |name;.ch|ar *defi|
|00000a00| 6e 65 73 5f 66 69 6c 65 | 5f 6e 61 6d 65 3b 0d 63 |nes_file|_name;.c|
|00000a10| 68 61 72 20 2a 69 6e 70 | 75 74 5f 66 69 6c 65 5f |har *inp|ut_file_|
|00000a20| 6e 61 6d 65 20 3d 20 22 | 22 3b 0d 63 68 61 72 20 |name = "|";.char |
|00000a30| 2a 6f 75 74 70 75 74 5f | 66 69 6c 65 5f 6e 61 6d |*output_|file_nam|
|00000a40| 65 3b 0d 63 68 61 72 20 | 2a 74 65 78 74 5f 66 69 |e;.char |*text_fi|
|00000a50| 6c 65 5f 6e 61 6d 65 3b | 0d 63 68 61 72 20 2a 75 |le_name;|.char *u|
|00000a60| 6e 69 6f 6e 5f 66 69 6c | 65 5f 6e 61 6d 65 3b 0d |nion_fil|e_name;.|
|00000a70| 63 68 61 72 20 2a 76 65 | 72 62 6f 73 65 5f 66 69 |char *ve|rbose_fi|
|00000a80| 6c 65 5f 6e 61 6d 65 3b | 0d 0d 46 49 4c 45 20 2a |le_name;|..FILE *|
|00000a90| 61 63 74 69 6f 6e 5f 66 | 69 6c 65 3b 09 2f 2a 20 |action_f|ile;./* |
|00000aa0| 20 61 20 74 65 6d 70 20 | 66 69 6c 65 2c 20 75 73 | a temp |file, us|
|00000ab0| 65 64 20 74 6f 20 73 61 | 76 65 20 61 63 74 69 6f |ed to sa|ve actio|
|00000ac0| 6e 73 20 61 73 73 6f 63 | 69 61 74 65 64 20 20 20 |ns assoc|iated |
|00000ad0| 20 2a 2f 0d 09 09 09 2f | 2a 20 20 77 69 74 68 20 | */..../|* with |
|00000ae0| 72 75 6c 65 73 20 75 6e | 74 69 6c 20 74 68 65 20 |rules un|til the |
|00000af0| 70 61 72 73 65 72 20 69 | 73 20 77 72 69 74 74 65 |parser i|s writte|
|00000b00| 6e 09 20 20 20 20 2a 2f | 0d 46 49 4c 45 20 2a 63 |n. */|.FILE *c|
|00000b10| 6f 64 65 5f 66 69 6c 65 | 3b 09 2f 2a 20 20 79 2e |ode_file|;./* y.|
|00000b20| 63 6f 64 65 2e 63 20 28 | 75 73 65 64 20 77 68 65 |code.c (|used whe|
|00000b30| 6e 20 74 68 65 20 2d 72 | 20 6f 70 74 69 6f 6e 20 |n the -r| option |
|00000b40| 69 73 20 73 70 65 63 69 | 66 69 65 64 29 20 2a 2f |is speci|fied) */|
|00000b50| 0d 46 49 4c 45 20 2a 64 | 65 66 69 6e 65 73 5f 66 |.FILE *d|efines_f|
|00000b60| 69 6c 65 3b 09 2f 2a 20 | 20 79 2e 74 61 62 2e 68 |ile;./* | y.tab.h|
|00000b70| 09 09 09 09 09 20 20 20 | 20 2a 2f 0d 46 49 4c 45 |..... | */.FILE|
|00000b80| 20 2a 69 6e 70 75 74 5f | 66 69 6c 65 3b 09 2f 2a | *input_|file;./*|
|00000b90| 20 20 74 68 65 20 69 6e | 70 75 74 20 66 69 6c 65 | the in|put file|
|00000ba0| 09 09 09 09 20 20 20 20 | 2a 2f 0d 46 49 4c 45 20 |.... |*/.FILE |
|00000bb0| 2a 6f 75 74 70 75 74 5f | 66 69 6c 65 3b 09 2f 2a |*output_|file;./*|
|00000bc0| 20 20 79 2e 74 61 62 2e | 63 09 09 09 09 09 20 20 | y.tab.|c..... |
|00000bd0| 20 20 2a 2f 0d 46 49 4c | 45 20 2a 74 65 78 74 5f | */.FIL|E *text_|
|00000be0| 66 69 6c 65 3b 09 2f 2a | 20 20 61 20 74 65 6d 70 |file;./*| a temp|
|00000bf0| 20 66 69 6c 65 2c 20 75 | 73 65 64 20 74 6f 20 73 | file, u|sed to s|
|00000c00| 61 76 65 20 74 65 78 74 | 20 75 6e 74 69 6c 20 61 |ave text| until a|
|00000c10| 6c 6c 09 20 20 20 20 2a | 2f 0d 09 09 09 2f 2a 20 |ll. *|/..../* |
|00000c20| 20 73 79 6d 62 6f 6c 73 | 20 68 61 76 65 20 62 65 | symbols| have be|
|00000c30| 65 6e 20 64 65 66 69 6e | 65 64 09 09 09 20 20 20 |en defin|ed... |
|00000c40| 20 2a 2f 0d 46 49 4c 45 | 20 2a 75 6e 69 6f 6e 5f | */.FILE| *union_|
|00000c50| 66 69 6c 65 3b 09 2f 2a | 20 20 61 20 74 65 6d 70 |file;./*| a temp|
|00000c60| 20 66 69 6c 65 2c 20 75 | 73 65 64 20 74 6f 20 73 | file, u|sed to s|
|00000c70| 61 76 65 20 74 68 65 20 | 75 6e 69 6f 6e 09 09 20 |ave the |union.. |
|00000c80| 20 20 20 2a 2f 0d 09 09 | 09 2f 2a 20 20 64 65 66 | */...|./* def|
|00000c90| 69 6e 69 74 69 6f 6e 20 | 75 6e 74 69 6c 20 61 6c |inition |until al|
|00000ca0| 6c 20 73 79 6d 62 6f 6c | 20 68 61 76 65 20 62 65 |l symbol| have be|
|00000cb0| 65 6e 09 20 20 20 20 2a | 2f 0d 09 09 09 2f 2a 20 |en. *|/..../* |
|00000cc0| 20 64 65 66 69 6e 65 64 | 09 09 09 09 09 20 20 20 | defined|..... |
|00000cd0| 20 2a 2f 0d 46 49 4c 45 | 20 2a 76 65 72 62 6f 73 | */.FILE| *verbos|
|00000ce0| 65 5f 66 69 6c 65 3b 09 | 2f 2a 20 20 79 2e 6f 75 |e_file;.|/* y.ou|
|00000cf0| 74 70 75 74 09 09 09 09 | 09 20 20 20 20 2a 2f 0d |tput....|. */.|
|00000d00| 0d 69 6e 74 20 6e 69 74 | 65 6d 73 3b 0d 69 6e 74 |.int nit|ems;.int|
|00000d10| 20 6e 72 75 6c 65 73 3b | 0d 69 6e 74 20 6e 73 79 | nrules;|.int nsy|
|00000d20| 6d 73 3b 0d 69 6e 74 20 | 6e 74 6f 6b 65 6e 73 3b |ms;.int |ntokens;|
|00000d30| 0d 69 6e 74 20 6e 76 61 | 72 73 3b 0d 0d 69 6e 74 |.int nva|rs;..int|
|00000d40| 20 20 20 73 74 61 72 74 | 5f 73 79 6d 62 6f 6c 3b | start|_symbol;|
|00000d50| 0d 63 68 61 72 20 20 2a | 2a 73 79 6d 62 6f 6c 5f |.char *|*symbol_|
|00000d60| 6e 61 6d 65 3b 0d 73 68 | 6f 72 74 20 2a 73 79 6d |name;.sh|ort *sym|
|00000d70| 62 6f 6c 5f 76 61 6c 75 | 65 3b 0d 73 68 6f 72 74 |bol_valu|e;.short|
|00000d80| 20 2a 73 79 6d 62 6f 6c | 5f 70 72 65 63 3b 0d 63 | *symbol|_prec;.c|
|00000d90| 68 61 72 20 20 2a 73 79 | 6d 62 6f 6c 5f 61 73 73 |har *sy|mbol_ass|
|00000da0| 6f 63 3b 0d 0d 73 68 6f | 72 74 20 2a 72 69 74 65 |oc;..sho|rt *rite|
|00000db0| 6d 3b 0d 73 68 6f 72 74 | 20 2a 72 6c 68 73 3b 0d |m;.short| *rlhs;.|
|00000dc0| 73 68 6f 72 74 20 2a 72 | 72 68 73 3b 0d 73 68 6f |short *r|rhs;.sho|
|00000dd0| 72 74 20 2a 72 70 72 65 | 63 3b 0d 63 68 61 72 20 |rt *rpre|c;.char |
|00000de0| 20 2a 72 61 73 73 6f 63 | 3b 0d 73 68 6f 72 74 20 | *rassoc|;.short |
|00000df0| 2a 2a 64 65 72 69 76 65 | 73 3b 0d 63 68 61 72 20 |**derive|s;.char |
|00000e00| 2a 6e 75 6c 6c 61 62 6c | 65 3b 0d 0d 65 78 74 65 |*nullabl|e;..exte|
|00000e10| 72 6e 20 63 68 61 72 20 | 2a 6d 6b 74 65 6d 70 28 |rn char |*mktemp(|
|00000e20| 29 3b 0d 65 78 74 65 72 | 6e 20 63 68 61 72 20 2a |);.exter|n char *|
|00000e30| 67 65 74 65 6e 76 28 29 | 3b 0d 0d 0d 64 6f 6e 65 |getenv()|;...done|
|00000e40| 28 6b 29 0d 69 6e 74 20 | 6b 3b 0d 7b 0d 20 20 20 |(k).int |k;.{. |
|00000e50| 20 69 66 20 28 61 63 74 | 69 6f 6e 5f 66 69 6c 65 | if (act|ion_file|
|00000e60| 29 20 7b 20 66 63 6c 6f | 73 65 28 61 63 74 69 6f |) { fclo|se(actio|
|00000e70| 6e 5f 66 69 6c 65 29 3b | 20 75 6e 6c 69 6e 6b 28 |n_file);| unlink(|
|00000e80| 61 63 74 69 6f 6e 5f 66 | 69 6c 65 5f 6e 61 6d 65 |action_f|ile_name|
|00000e90| 29 3b 20 7d 0d 20 20 20 | 20 69 66 20 28 74 65 78 |); }. | if (tex|
|00000ea0| 74 5f 66 69 6c 65 29 20 | 7b 20 66 63 6c 6f 73 65 |t_file) |{ fclose|
|00000eb0| 28 74 65 78 74 5f 66 69 | 6c 65 29 3b 20 75 6e 6c |(text_fi|le); unl|
|00000ec0| 69 6e 6b 28 74 65 78 74 | 5f 66 69 6c 65 5f 6e 61 |ink(text|_file_na|
|00000ed0| 6d 65 29 3b 20 7d 0d 20 | 20 20 20 69 66 20 28 75 |me); }. | if (u|
|00000ee0| 6e 69 6f 6e 5f 66 69 6c | 65 29 20 7b 20 66 63 6c |nion_fil|e) { fcl|
|00000ef0| 6f 73 65 28 75 6e 69 6f | 6e 5f 66 69 6c 65 29 3b |ose(unio|n_file);|
|00000f00| 20 75 6e 6c 69 6e 6b 28 | 75 6e 69 6f 6e 5f 66 69 | unlink(|union_fi|
|00000f10| 6c 65 5f 6e 61 6d 65 29 | 3b 20 7d 0d 20 20 20 20 |le_name)|; }. |
|00000f20| 65 78 69 74 28 6b 29 3b | 0d 7d 0d 0d 0d 76 6f 69 |exit(k);|.}...voi|
|00000f30| 64 0d 6f 6e 69 6e 74 72 | 28 29 0d 7b 0d 20 20 20 |d.onintr|().{. |
|00000f40| 20 64 6f 6e 65 28 31 29 | 3b 0d 7d 0d 0d 0d 73 65 | done(1)|;.}...se|
|00000f50| 74 5f 73 69 67 6e 61 6c | 73 28 29 0d 7b 0d 23 69 |t_signal|s().{.#i|
|00000f60| 66 64 65 66 20 53 49 47 | 49 4e 54 0d 20 20 20 20 |fdef SIG|INT. |
|00000f70| 69 66 20 28 73 69 67 6e | 61 6c 28 53 49 47 49 4e |if (sign|al(SIGIN|
|00000f80| 54 2c 20 53 49 47 5f 49 | 47 4e 29 20 21 3d 20 53 |T, SIG_I|GN) != S|
|00000f90| 49 47 5f 49 47 4e 29 0d | 09 73 69 67 6e 61 6c 28 |IG_IGN).|.signal(|
|00000fa0| 53 49 47 49 4e 54 2c 20 | 6f 6e 69 6e 74 72 29 3b |SIGINT, |onintr);|
|00000fb0| 0d 23 65 6e 64 69 66 0d | 23 69 66 64 65 66 20 53 |.#endif.|#ifdef S|
|00000fc0| 49 47 54 45 52 4d 0d 20 | 20 20 20 69 66 20 28 73 |IGTERM. | if (s|
|00000fd0| 69 67 6e 61 6c 28 53 49 | 47 54 45 52 4d 2c 20 53 |ignal(SI|GTERM, S|
|00000fe0| 49 47 5f 49 47 4e 29 20 | 21 3d 20 53 49 47 5f 49 |IG_IGN) |!= SIG_I|
|00000ff0| 47 4e 29 0d 09 73 69 67 | 6e 61 6c 28 53 49 47 54 |GN)..sig|nal(SIGT|
|00001000| 45 52 4d 2c 20 6f 6e 69 | 6e 74 72 29 3b 0d 23 65 |ERM, oni|ntr);.#e|
|00001010| 6e 64 69 66 0d 23 69 66 | 64 65 66 20 53 49 47 48 |ndif.#if|def SIGH|
|00001020| 55 50 0d 20 20 20 20 69 | 66 20 28 73 69 67 6e 61 |UP. i|f (signa|
|00001030| 6c 28 53 49 47 48 55 50 | 2c 20 53 49 47 5f 49 47 |l(SIGHUP|, SIG_IG|
|00001040| 4e 29 20 21 3d 20 53 49 | 47 5f 49 47 4e 29 0d 09 |N) != SI|G_IGN)..|
|00001050| 73 69 67 6e 61 6c 28 53 | 49 47 48 55 50 2c 20 6f |signal(S|IGHUP, o|
|00001060| 6e 69 6e 74 72 29 3b 0d | 23 65 6e 64 69 66 0d 7d |nintr);.|#endif.}|
|00001070| 0d 0d 0d 75 73 61 67 65 | 28 29 0d 7b 0d 20 20 20 |...usage|().{. |
|00001080| 20 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c | fprintf|(stderr,|
|00001090| 20 22 75 73 61 67 65 3a | 20 25 73 20 5b 2d 64 6c | "usage:| %s [-dl|
|000010a0| 72 74 76 5d 20 5b 2d 62 | 20 66 69 6c 65 5f 70 72 |rtv] [-b| file_pr|
|000010b0| 65 66 69 78 5d 20 66 69 | 6c 65 6e 61 6d 65 5c 6e |efix] fi|lename\n|
|000010c0| 22 2c 20 6d 79 6e 61 6d | 65 29 3b 0d 20 20 20 20 |", mynam|e);. |
|000010d0| 65 78 69 74 28 31 29 3b | 0d 7d 0d 0d 0d 67 65 74 |exit(1);|.}...get|
|000010e0| 61 72 67 73 28 61 72 67 | 63 2c 20 61 72 67 76 29 |args(arg|c, argv)|
|000010f0| 0d 69 6e 74 20 61 72 67 | 63 3b 0d 63 68 61 72 20 |.int arg|c;.char |
|00001100| 2a 61 72 67 76 5b 5d 3b | 0d 7b 0d 20 20 20 20 72 |*argv[];|.{. r|
|00001110| 65 67 69 73 74 65 72 20 | 69 6e 74 20 69 3b 0d 20 |egister |int i;. |
|00001120| 20 20 20 72 65 67 69 73 | 74 65 72 20 63 68 61 72 | regis|ter char|
|00001130| 20 2a 73 3b 0d 0d 20 20 | 20 20 69 66 20 28 61 72 | *s;.. | if (ar|
|00001140| 67 63 20 3e 20 30 29 20 | 6d 79 6e 61 6d 65 20 3d |gc > 0) |myname =|
|00001150| 20 61 72 67 76 5b 30 5d | 3b 0d 20 20 20 20 66 6f | argv[0]|;. fo|
|00001160| 72 20 28 69 20 3d 20 31 | 3b 20 69 20 3c 20 61 72 |r (i = 1|; i < ar|
|00001170| 67 63 3b 20 2b 2b 69 29 | 0d 20 20 20 20 7b 0d 09 |gc; ++i)|. {..|
|00001180| 73 20 3d 20 61 72 67 76 | 5b 69 5d 3b 0d 09 69 66 |s = argv|[i];..if|
|00001190| 20 28 2a 73 20 21 3d 20 | 27 2d 27 29 20 62 72 65 | (*s != |'-') bre|
|000011a0| 61 6b 3b 0d 09 73 77 69 | 74 63 68 20 28 2a 2b 2b |ak;..swi|tch (*++|
|000011b0| 73 29 0d 09 7b 0d 09 63 | 61 73 65 20 27 5c 30 27 |s)..{..c|ase '\0'|
|000011c0| 3a 0d 09 20 20 20 20 69 | 6e 70 75 74 5f 66 69 6c |:.. i|nput_fil|
|000011d0| 65 20 3d 20 73 74 64 69 | 6e 3b 0d 09 20 20 20 20 |e = stdi|n;.. |
|000011e0| 69 66 20 28 69 20 2b 20 | 31 20 3c 20 61 72 67 63 |if (i + |1 < argc|
|000011f0| 29 20 75 73 61 67 65 28 | 29 3b 0d 09 20 20 20 20 |) usage(|);.. |
|00001200| 72 65 74 75 72 6e 3b 0d | 0d 09 63 61 73 65 20 27 |return;.|..case '|
|00001210| 2d 27 3a 0d 09 20 20 20 | 20 2b 2b 69 3b 0d 09 20 |-':.. | ++i;.. |
|00001220| 20 20 20 67 6f 74 6f 20 | 6e 6f 5f 6d 6f 72 65 5f | goto |no_more_|
|00001230| 6f 70 74 69 6f 6e 73 3b | 0d 0d 09 63 61 73 65 20 |options;|...case |
|00001240| 27 62 27 3a 0d 09 20 20 | 20 20 69 66 20 28 2a 2b |'b':.. | if (*+|
|00001250| 2b 73 29 0d 09 09 20 66 | 69 6c 65 5f 70 72 65 66 |+s)... f|ile_pref|
|00001260| 69 78 20 3d 20 73 3b 0d | 09 20 20 20 20 65 6c 73 |ix = s;.|. els|
|00001270| 65 20 69 66 20 28 2b 2b | 69 20 3c 20 61 72 67 63 |e if (++|i < argc|
|00001280| 29 0d 09 09 66 69 6c 65 | 5f 70 72 65 66 69 78 20 |)...file|_prefix |
|00001290| 3d 20 61 72 67 76 5b 69 | 5d 3b 0d 09 20 20 20 20 |= argv[i|];.. |
|000012a0| 65 6c 73 65 0d 09 09 75 | 73 61 67 65 28 29 3b 0d |else...u|sage();.|
|000012b0| 09 20 20 20 20 63 6f 6e | 74 69 6e 75 65 3b 0d 0d |. con|tinue;..|
|000012c0| 09 63 61 73 65 20 27 64 | 27 3a 0d 09 20 20 20 20 |.case 'd|':.. |
|000012d0| 64 66 6c 61 67 20 3d 20 | 31 3b 0d 09 20 20 20 20 |dflag = |1;.. |
|000012e0| 62 72 65 61 6b 3b 0d 0d | 09 63 61 73 65 20 27 6c |break;..|.case 'l|
|000012f0| 27 3a 0d 09 20 20 20 20 | 6c 66 6c 61 67 20 3d 20 |':.. |lflag = |
|00001300| 31 3b 0d 09 20 20 20 20 | 62 72 65 61 6b 3b 0d 0d |1;.. |break;..|
|00001310| 09 63 61 73 65 20 27 72 | 27 3a 0d 09 20 20 20 20 |.case 'r|':.. |
|00001320| 72 66 6c 61 67 20 3d 20 | 31 3b 0d 09 20 20 20 20 |rflag = |1;.. |
|00001330| 62 72 65 61 6b 3b 0d 0d | 09 63 61 73 65 20 27 74 |break;..|.case 't|
|00001340| 27 3a 0d 09 20 20 20 20 | 74 66 6c 61 67 20 3d 20 |':.. |tflag = |
|00001350| 31 3b 0d 09 20 20 20 20 | 62 72 65 61 6b 3b 0d 0d |1;.. |break;..|
|00001360| 09 63 61 73 65 20 27 76 | 27 3a 0d 09 20 20 20 20 |.case 'v|':.. |
|00001370| 76 66 6c 61 67 20 3d 20 | 31 3b 0d 09 20 20 20 20 |vflag = |1;.. |
|00001380| 62 72 65 61 6b 3b 0d 0d | 09 64 65 66 61 75 6c 74 |break;..|.default|
|00001390| 3a 0d 09 20 20 20 20 75 | 73 61 67 65 28 29 3b 0d |:.. u|sage();.|
|000013a0| 09 7d 0d 0d 09 66 6f 72 | 20 28 3b 3b 29 0d 09 7b |.}...for| (;;)..{|
|000013b0| 0d 09 20 20 20 20 73 77 | 69 74 63 68 20 28 2a 2b |.. sw|itch (*+|
|000013c0| 2b 73 29 0d 09 20 20 20 | 20 7b 0d 09 20 20 20 20 |+s).. | {.. |
|000013d0| 63 61 73 65 20 27 5c 30 | 27 3a 0d 09 09 67 6f 74 |case '\0|':...got|
|000013e0| 6f 20 65 6e 64 5f 6f 66 | 5f 6f 70 74 69 6f 6e 3b |o end_of|_option;|
|000013f0| 0d 0d 09 20 20 20 20 63 | 61 73 65 20 27 64 27 3a |... c|ase 'd':|
|00001400| 0d 09 09 64 66 6c 61 67 | 20 3d 20 31 3b 0d 09 09 |...dflag| = 1;...|
|00001410| 62 72 65 61 6b 3b 0d 0d | 09 20 20 20 20 63 61 73 |break;..|. cas|
|00001420| 65 20 27 6c 27 3a 0d 09 | 09 6c 66 6c 61 67 20 3d |e 'l':..|.lflag =|
|00001430| 20 31 3b 0d 09 09 62 72 | 65 61 6b 3b 0d 0d 09 20 | 1;...br|eak;... |
|00001440| 20 20 20 63 61 73 65 20 | 27 72 27 3a 0d 09 09 72 | case |'r':...r|
|00001450| 66 6c 61 67 20 3d 20 31 | 3b 0d 09 09 62 72 65 61 |flag = 1|;...brea|
|00001460| 6b 3b 0d 0d 09 20 20 20 | 20 63 61 73 65 20 27 74 |k;... | case 't|
|00001470| 27 3a 0d 09 09 74 66 6c | 61 67 20 3d 20 31 3b 0d |':...tfl|ag = 1;.|
|00001480| 09 09 62 72 65 61 6b 3b | 0d 0d 09 20 20 20 20 63 |..break;|... c|
|00001490| 61 73 65 20 27 76 27 3a | 0d 09 09 76 66 6c 61 67 |ase 'v':|...vflag|
|000014a0| 20 3d 20 31 3b 0d 09 09 | 62 72 65 61 6b 3b 0d 0d | = 1;...|break;..|
|000014b0| 09 20 20 20 20 64 65 66 | 61 75 6c 74 3a 0d 09 09 |. def|ault:...|
|000014c0| 75 73 61 67 65 28 29 3b | 0d 09 20 20 20 20 7d 0d |usage();|.. }.|
|000014d0| 09 7d 0d 65 6e 64 5f 6f | 66 5f 6f 70 74 69 6f 6e |.}.end_o|f_option|
|000014e0| 3a 3b 0d 20 20 20 20 7d | 0d 0d 6e 6f 5f 6d 6f 72 |:;. }|..no_mor|
|000014f0| 65 5f 6f 70 74 69 6f 6e | 73 3a 3b 0d 20 20 20 20 |e_option|s:;. |
|00001500| 69 66 20 28 69 20 2b 20 | 31 20 21 3d 20 61 72 67 |if (i + |1 != arg|
|00001510| 63 29 20 75 73 61 67 65 | 28 29 3b 0d 20 20 20 20 |c) usage|();. |
|00001520| 69 6e 70 75 74 5f 66 69 | 6c 65 5f 6e 61 6d 65 20 |input_fi|le_name |
|00001530| 3d 20 61 72 67 76 5b 69 | 5d 3b 0d 7d 0d 0d 0d 63 |= argv[i|];.}...c|
|00001540| 68 61 72 20 2a 0d 61 6c | 6c 6f 63 61 74 65 28 6e |har *.al|locate(n|
|00001550| 29 0d 75 6e 73 69 67 6e | 65 64 20 6e 3b 0d 7b 0d |).unsign|ed n;.{.|
|00001560| 20 20 20 20 72 65 67 69 | 73 74 65 72 20 63 68 61 | regi|ster cha|
|00001570| 72 20 2a 70 3b 0d 0d 20 | 20 20 20 70 20 3d 20 4e |r *p;.. | p = N|
|00001580| 55 4c 4c 3b 0d 20 20 20 | 20 69 66 20 28 6e 29 0d |ULL;. | if (n).|
|00001590| 20 20 20 20 7b 0d 09 70 | 20 3d 20 43 41 4c 4c 4f | {..p| = CALLO|
|000015a0| 43 28 31 2c 20 6e 29 3b | 0d 09 69 66 20 28 21 70 |C(1, n);|..if (!p|
|000015b0| 29 20 6e 6f 5f 73 70 61 | 63 65 28 29 3b 0d 20 20 |) no_spa|ce();. |
|000015c0| 20 20 7d 0d 20 20 20 20 | 72 65 74 75 72 6e 20 28 | }. |return (|
|000015d0| 70 29 3b 0d 7d 0d 0d 0d | 63 72 65 61 74 65 5f 66 |p);.}...|create_f|
|000015e0| 69 6c 65 5f 6e 61 6d 65 | 73 28 29 0d 7b 0d 20 20 |ile_name|s().{. |
|000015f0| 20 20 69 6e 74 20 69 2c | 20 6c 65 6e 3b 0d 20 20 | int i,| len;. |
|00001600| 20 20 63 68 61 72 20 2a | 74 6d 70 64 69 72 3b 0d | char *|tmpdir;.|
|00001610| 0d 20 20 20 20 74 6d 70 | 64 69 72 20 3d 20 67 65 |. tmp|dir = ge|
|00001620| 74 65 6e 76 28 22 54 4d | 50 44 49 52 22 29 3b 0d |tenv("TM|PDIR");.|
|00001630| 20 20 20 20 69 66 20 28 | 74 6d 70 64 69 72 20 3d | if (|tmpdir =|
|00001640| 3d 20 30 29 20 74 6d 70 | 64 69 72 20 3d 20 22 2f |= 0) tmp|dir = "/|
|00001650| 74 6d 70 22 3b 0d 0d 20 | 20 20 20 6c 65 6e 20 3d |tmp";.. | len =|
|00001660| 20 73 74 72 6c 65 6e 28 | 74 6d 70 64 69 72 29 3b | strlen(|tmpdir);|
|00001670| 0d 20 20 20 20 69 20 3d | 20 6c 65 6e 20 2b 20 31 |. i =| len + 1|
|00001680| 33 3b 0d 20 20 20 20 69 | 66 20 28 6c 65 6e 20 26 |3;. i|f (len &|
|00001690| 26 20 74 6d 70 64 69 72 | 5b 6c 65 6e 2d 31 5d 20 |& tmpdir|[len-1] |
|000016a0| 21 3d 20 27 2f 27 29 0d | 09 2b 2b 69 3b 0d 0d 20 |!= '/').|.++i;.. |
|000016b0| 20 20 20 61 63 74 69 6f | 6e 5f 66 69 6c 65 5f 6e | actio|n_file_n|
|000016c0| 61 6d 65 20 3d 20 4d 41 | 4c 4c 4f 43 28 69 29 3b |ame = MA|LLOC(i);|
|000016d0| 0d 20 20 20 20 69 66 20 | 28 61 63 74 69 6f 6e 5f |. if |(action_|
|000016e0| 66 69 6c 65 5f 6e 61 6d | 65 20 3d 3d 20 30 29 20 |file_nam|e == 0) |
|000016f0| 6e 6f 5f 73 70 61 63 65 | 28 29 3b 0d 20 20 20 20 |no_space|();. |
|00001700| 74 65 78 74 5f 66 69 6c | 65 5f 6e 61 6d 65 20 3d |text_fil|e_name =|
|00001710| 20 4d 41 4c 4c 4f 43 28 | 69 29 3b 0d 20 20 20 20 | MALLOC(|i);. |
|00001720| 69 66 20 28 74 65 78 74 | 5f 66 69 6c 65 5f 6e 61 |if (text|_file_na|
|00001730| 6d 65 20 3d 3d 20 30 29 | 20 6e 6f 5f 73 70 61 63 |me == 0)| no_spac|
|00001740| 65 28 29 3b 0d 20 20 20 | 20 75 6e 69 6f 6e 5f 66 |e();. | union_f|
|00001750| 69 6c 65 5f 6e 61 6d 65 | 20 3d 20 4d 41 4c 4c 4f |ile_name| = MALLO|
|00001760| 43 28 69 29 3b 0d 20 20 | 20 20 69 66 20 28 75 6e |C(i);. | if (un|
|00001770| 69 6f 6e 5f 66 69 6c 65 | 5f 6e 61 6d 65 20 3d 3d |ion_file|_name ==|
|00001780| 20 30 29 20 6e 6f 5f 73 | 70 61 63 65 28 29 3b 0d | 0) no_s|pace();.|
|00001790| 0d 20 20 20 20 73 74 72 | 63 70 79 28 61 63 74 69 |. str|cpy(acti|
|000017a0| 6f 6e 5f 66 69 6c 65 5f | 6e 61 6d 65 2c 20 74 6d |on_file_|name, tm|
|000017b0| 70 64 69 72 29 3b 0d 20 | 20 20 20 73 74 72 63 70 |pdir);. | strcp|
|000017c0| 79 28 74 65 78 74 5f 66 | 69 6c 65 5f 6e 61 6d 65 |y(text_f|ile_name|
|000017d0| 2c 20 74 6d 70 64 69 72 | 29 3b 0d 20 20 20 20 73 |, tmpdir|);. s|
|000017e0| 74 72 63 70 79 28 75 6e | 69 6f 6e 5f 66 69 6c 65 |trcpy(un|ion_file|
|000017f0| 5f 6e 61 6d 65 2c 20 74 | 6d 70 64 69 72 29 3b 0d |_name, t|mpdir);.|
|00001800| 0d 20 20 20 20 69 66 20 | 28 6c 65 6e 20 26 26 20 |. if |(len && |
|00001810| 74 6d 70 64 69 72 5b 6c | 65 6e 20 2d 20 31 5d 20 |tmpdir[l|en - 1] |
|00001820| 21 3d 20 27 2f 27 29 0d | 20 20 20 20 7b 0d 09 61 |!= '/').| {..a|
|00001830| 63 74 69 6f 6e 5f 66 69 | 6c 65 5f 6e 61 6d 65 5b |ction_fi|le_name[|
|00001840| 6c 65 6e 5d 20 3d 20 27 | 2f 27 3b 0d 09 74 65 78 |len] = '|/';..tex|
|00001850| 74 5f 66 69 6c 65 5f 6e | 61 6d 65 5b 6c 65 6e 5d |t_file_n|ame[len]|
|00001860| 20 3d 20 27 2f 27 3b 0d | 09 75 6e 69 6f 6e 5f 66 | = '/';.|.union_f|
|00001870| 69 6c 65 5f 6e 61 6d 65 | 5b 6c 65 6e 5d 20 3d 20 |ile_name|[len] = |
|00001880| 27 2f 27 3b 0d 09 2b 2b | 6c 65 6e 3b 0d 20 20 20 |'/';..++|len;. |
|00001890| 20 7d 0d 0d 20 20 20 20 | 73 74 72 63 70 79 28 61 | }.. |strcpy(a|
|000018a0| 63 74 69 6f 6e 5f 66 69 | 6c 65 5f 6e 61 6d 65 20 |ction_fi|le_name |
|000018b0| 2b 20 6c 65 6e 2c 20 74 | 65 6d 70 5f 66 6f 72 6d |+ len, t|emp_form|
|000018c0| 29 3b 0d 20 20 20 20 73 | 74 72 63 70 79 28 74 65 |);. s|trcpy(te|
|000018d0| 78 74 5f 66 69 6c 65 5f | 6e 61 6d 65 20 2b 20 6c |xt_file_|name + l|
|000018e0| 65 6e 2c 20 74 65 6d 70 | 5f 66 6f 72 6d 29 3b 0d |en, temp|_form);.|
|000018f0| 20 20 20 20 73 74 72 63 | 70 79 28 75 6e 69 6f 6e | strc|py(union|
|00001900| 5f 66 69 6c 65 5f 6e 61 | 6d 65 20 2b 20 6c 65 6e |_file_na|me + len|
|00001910| 2c 20 74 65 6d 70 5f 66 | 6f 72 6d 29 3b 0d 0d 20 |, temp_f|orm);.. |
|00001920| 20 20 20 61 63 74 69 6f | 6e 5f 66 69 6c 65 5f 6e | actio|n_file_n|
|00001930| 61 6d 65 5b 6c 65 6e 20 | 2b 20 35 5d 20 3d 20 27 |ame[len |+ 5] = '|
|00001940| 61 27 3b 0d 20 20 20 20 | 74 65 78 74 5f 66 69 6c |a';. |text_fil|
|00001950| 65 5f 6e 61 6d 65 5b 6c | 65 6e 20 2b 20 35 5d 20 |e_name[l|en + 5] |
|00001960| 3d 20 27 74 27 3b 0d 20 | 20 20 20 75 6e 69 6f 6e |= 't';. | union|
|00001970| 5f 66 69 6c 65 5f 6e 61 | 6d 65 5b 6c 65 6e 20 2b |_file_na|me[len +|
|00001980| 20 35 5d 20 3d 20 27 75 | 27 3b 0d 0d 20 20 20 20 | 5] = 'u|';.. |
|00001990| 6d 6b 74 65 6d 70 28 61 | 63 74 69 6f 6e 5f 66 69 |mktemp(a|ction_fi|
|000019a0| 6c 65 5f 6e 61 6d 65 29 | 3b 0d 20 20 20 20 6d 6b |le_name)|;. mk|
|000019b0| 74 65 6d 70 28 74 65 78 | 74 5f 66 69 6c 65 5f 6e |temp(tex|t_file_n|
|000019c0| 61 6d 65 29 3b 0d 20 20 | 20 20 6d 6b 74 65 6d 70 |ame);. | mktemp|
|000019d0| 28 75 6e 69 6f 6e 5f 66 | 69 6c 65 5f 6e 61 6d 65 |(union_f|ile_name|
|000019e0| 29 3b 0d 0d 20 20 20 20 | 6c 65 6e 20 3d 20 73 74 |);.. |len = st|
|000019f0| 72 6c 65 6e 28 66 69 6c | 65 5f 70 72 65 66 69 78 |rlen(fil|e_prefix|
|00001a00| 29 3b 0d 0d 20 20 20 20 | 6f 75 74 70 75 74 5f 66 |);.. |output_f|
|00001a10| 69 6c 65 5f 6e 61 6d 65 | 20 3d 20 4d 41 4c 4c 4f |ile_name| = MALLO|
|00001a20| 43 28 6c 65 6e 20 2b 20 | 37 29 3b 0d 20 20 20 20 |C(len + |7);. |
|00001a30| 69 66 20 28 6f 75 74 70 | 75 74 5f 66 69 6c 65 5f |if (outp|ut_file_|
|00001a40| 6e 61 6d 65 20 3d 3d 20 | 30 29 0d 09 6e 6f 5f 73 |name == |0)..no_s|
|00001a50| 70 61 63 65 28 29 3b 0d | 20 20 20 20 73 74 72 63 |pace();.| strc|
|00001a60| 70 79 28 6f 75 74 70 75 | 74 5f 66 69 6c 65 5f 6e |py(outpu|t_file_n|
|00001a70| 61 6d 65 2c 20 66 69 6c | 65 5f 70 72 65 66 69 78 |ame, fil|e_prefix|
|00001a80| 29 3b 0d 20 20 20 20 73 | 74 72 63 70 79 28 6f 75 |);. s|trcpy(ou|
|00001a90| 74 70 75 74 5f 66 69 6c | 65 5f 6e 61 6d 65 20 2b |tput_fil|e_name +|
|00001aa0| 20 6c 65 6e 2c 20 4f 55 | 54 50 55 54 5f 53 55 46 | len, OU|TPUT_SUF|
|00001ab0| 46 49 58 29 3b 0d 0d 20 | 20 20 20 69 66 20 28 72 |FIX);.. | if (r|
|00001ac0| 66 6c 61 67 29 0d 20 20 | 20 20 7b 0d 09 63 6f 64 |flag). | {..cod|
|00001ad0| 65 5f 66 69 6c 65 5f 6e | 61 6d 65 20 3d 20 4d 41 |e_file_n|ame = MA|
|00001ae0| 4c 4c 4f 43 28 6c 65 6e | 20 2b 20 38 29 3b 0d 09 |LLOC(len| + 8);..|
|00001af0| 69 66 20 28 63 6f 64 65 | 5f 66 69 6c 65 5f 6e 61 |if (code|_file_na|
|00001b00| 6d 65 20 3d 3d 20 30 29 | 0d 09 20 20 20 20 6e 6f |me == 0)|.. no|
|00001b10| 5f 73 70 61 63 65 28 29 | 3b 0d 09 73 74 72 63 70 |_space()|;..strcp|
|00001b20| 79 28 63 6f 64 65 5f 66 | 69 6c 65 5f 6e 61 6d 65 |y(code_f|ile_name|
|00001b30| 2c 20 66 69 6c 65 5f 70 | 72 65 66 69 78 29 3b 0d |, file_p|refix);.|
|00001b40| 09 73 74 72 63 70 79 28 | 63 6f 64 65 5f 66 69 6c |.strcpy(|code_fil|
|00001b50| 65 5f 6e 61 6d 65 20 2b | 20 6c 65 6e 2c 20 43 4f |e_name +| len, CO|
|00001b60| 44 45 5f 53 55 46 46 49 | 58 29 3b 0d 20 20 20 20 |DE_SUFFI|X);. |
|00001b70| 7d 0d 20 20 20 20 65 6c | 73 65 0d 09 63 6f 64 65 |}. el|se..code|
|00001b80| 5f 66 69 6c 65 5f 6e 61 | 6d 65 20 3d 20 6f 75 74 |_file_na|me = out|
|00001b90| 70 75 74 5f 66 69 6c 65 | 5f 6e 61 6d 65 3b 0d 0d |put_file|_name;..|
|00001ba0| 20 20 20 20 69 66 20 28 | 64 66 6c 61 67 29 0d 20 | if (|dflag). |
|00001bb0| 20 20 20 7b 0d 09 64 65 | 66 69 6e 65 73 5f 66 69 | {..de|fines_fi|
|00001bc0| 6c 65 5f 6e 61 6d 65 20 | 3d 20 4d 41 4c 4c 4f 43 |le_name |= MALLOC|
|00001bd0| 28 6c 65 6e 20 2b 20 37 | 29 3b 0d 09 69 66 20 28 |(len + 7|);..if (|
|00001be0| 64 65 66 69 6e 65 73 5f | 66 69 6c 65 5f 6e 61 6d |defines_|file_nam|
|00001bf0| 65 20 3d 3d 20 30 29 0d | 09 20 20 20 20 6e 6f 5f |e == 0).|. no_|
|00001c00| 73 70 61 63 65 28 29 3b | 0d 09 73 74 72 63 70 79 |space();|..strcpy|
|00001c10| 28 64 65 66 69 6e 65 73 | 5f 66 69 6c 65 5f 6e 61 |(defines|_file_na|
|00001c20| 6d 65 2c 20 66 69 6c 65 | 5f 70 72 65 66 69 78 29 |me, file|_prefix)|
|00001c30| 3b 0d 09 73 74 72 63 70 | 79 28 64 65 66 69 6e 65 |;..strcp|y(define|
|00001c40| 73 5f 66 69 6c 65 5f 6e | 61 6d 65 20 2b 20 6c 65 |s_file_n|ame + le|
|00001c50| 6e 2c 20 44 45 46 49 4e | 45 53 5f 53 55 46 46 49 |n, DEFIN|ES_SUFFI|
|00001c60| 58 29 3b 0d 20 20 20 20 | 7d 0d 0d 20 20 20 20 69 |X);. |}.. i|
|00001c70| 66 20 28 76 66 6c 61 67 | 29 0d 20 20 20 20 7b 0d |f (vflag|). {.|
|00001c80| 09 76 65 72 62 6f 73 65 | 5f 66 69 6c 65 5f 6e 61 |.verbose|_file_na|
|00001c90| 6d 65 20 3d 20 4d 41 4c | 4c 4f 43 28 6c 65 6e 20 |me = MAL|LOC(len |
|00001ca0| 2b 20 38 29 3b 0d 09 69 | 66 20 28 76 65 72 62 6f |+ 8);..i|f (verbo|
|00001cb0| 73 65 5f 66 69 6c 65 5f | 6e 61 6d 65 20 3d 3d 20 |se_file_|name == |
|00001cc0| 30 29 0d 09 20 20 20 20 | 6e 6f 5f 73 70 61 63 65 |0).. |no_space|
|00001cd0| 28 29 3b 0d 09 73 74 72 | 63 70 79 28 76 65 72 62 |();..str|cpy(verb|
|00001ce0| 6f 73 65 5f 66 69 6c 65 | 5f 6e 61 6d 65 2c 20 66 |ose_file|_name, f|
|00001cf0| 69 6c 65 5f 70 72 65 66 | 69 78 29 3b 0d 09 73 74 |ile_pref|ix);..st|
|00001d00| 72 63 70 79 28 76 65 72 | 62 6f 73 65 5f 66 69 6c |rcpy(ver|bose_fil|
|00001d10| 65 5f 6e 61 6d 65 20 2b | 20 6c 65 6e 2c 20 56 45 |e_name +| len, VE|
|00001d20| 52 42 4f 53 45 5f 53 55 | 46 46 49 58 29 3b 0d 20 |RBOSE_SU|FFIX);. |
|00001d30| 20 20 20 7d 0d 7d 0d 0d | 0d 6f 70 65 6e 5f 66 69 | }.}..|.open_fi|
|00001d40| 6c 65 73 28 29 0d 7b 0d | 20 20 20 20 63 72 65 61 |les().{.| crea|
|00001d50| 74 65 5f 66 69 6c 65 5f | 6e 61 6d 65 73 28 29 3b |te_file_|names();|
|00001d60| 0d 0d 20 20 20 20 69 66 | 20 28 69 6e 70 75 74 5f |.. if| (input_|
|00001d70| 66 69 6c 65 20 3d 3d 20 | 30 29 0d 20 20 20 20 7b |file == |0). {|
|00001d80| 0d 09 69 6e 70 75 74 5f | 66 69 6c 65 20 3d 20 66 |..input_|file = f|
|00001d90| 6f 70 65 6e 28 69 6e 70 | 75 74 5f 66 69 6c 65 5f |open(inp|ut_file_|
|00001da0| 6e 61 6d 65 2c 20 22 72 | 22 29 3b 0d 09 69 66 20 |name, "r|");..if |
|00001db0| 28 69 6e 70 75 74 5f 66 | 69 6c 65 20 3d 3d 20 30 |(input_f|ile == 0|
|00001dc0| 29 0d 09 20 20 20 20 6f | 70 65 6e 5f 65 72 72 6f |).. o|pen_erro|
|00001dd0| 72 28 69 6e 70 75 74 5f | 66 69 6c 65 5f 6e 61 6d |r(input_|file_nam|
|00001de0| 65 29 3b 0d 20 20 20 20 | 7d 0d 0d 20 20 20 20 61 |e);. |}.. a|
|00001df0| 63 74 69 6f 6e 5f 66 69 | 6c 65 20 3d 20 66 6f 70 |ction_fi|le = fop|
|00001e00| 65 6e 28 61 63 74 69 6f | 6e 5f 66 69 6c 65 5f 6e |en(actio|n_file_n|
|00001e10| 61 6d 65 2c 20 22 77 22 | 29 3b 0d 20 20 20 20 69 |ame, "w"|);. i|
|00001e20| 66 20 28 61 63 74 69 6f | 6e 5f 66 69 6c 65 20 3d |f (actio|n_file =|
|00001e30| 3d 20 30 29 0d 09 6f 70 | 65 6e 5f 65 72 72 6f 72 |= 0)..op|en_error|
|00001e40| 28 61 63 74 69 6f 6e 5f | 66 69 6c 65 5f 6e 61 6d |(action_|file_nam|
|00001e50| 65 29 3b 0d 0d 20 20 20 | 20 74 65 78 74 5f 66 69 |e);.. | text_fi|
|00001e60| 6c 65 20 3d 20 66 6f 70 | 65 6e 28 74 65 78 74 5f |le = fop|en(text_|
|00001e70| 66 69 6c 65 5f 6e 61 6d | 65 2c 20 22 77 22 29 3b |file_nam|e, "w");|
|00001e80| 0d 20 20 20 20 69 66 20 | 28 74 65 78 74 5f 66 69 |. if |(text_fi|
|00001e90| 6c 65 20 3d 3d 20 30 29 | 0d 09 6f 70 65 6e 5f 65 |le == 0)|..open_e|
|00001ea0| 72 72 6f 72 28 74 65 78 | 74 5f 66 69 6c 65 5f 6e |rror(tex|t_file_n|
|00001eb0| 61 6d 65 29 3b 0d 0d 20 | 20 20 20 69 66 20 28 76 |ame);.. | if (v|
|00001ec0| 66 6c 61 67 29 0d 20 20 | 20 20 7b 0d 09 76 65 72 |flag). | {..ver|
|00001ed0| 62 6f 73 65 5f 66 69 6c | 65 20 3d 20 66 6f 70 65 |bose_fil|e = fope|
|00001ee0| 6e 28 76 65 72 62 6f 73 | 65 5f 66 69 6c 65 5f 6e |n(verbos|e_file_n|
|00001ef0| 61 6d 65 2c 20 22 77 22 | 29 3b 0d 09 69 66 20 28 |ame, "w"|);..if (|
|00001f00| 76 65 72 62 6f 73 65 5f | 66 69 6c 65 20 3d 3d 20 |verbose_|file == |
|00001f10| 30 29 0d 09 20 20 20 20 | 6f 70 65 6e 5f 65 72 72 |0).. |open_err|
|00001f20| 6f 72 28 76 65 72 62 6f | 73 65 5f 66 69 6c 65 5f |or(verbo|se_file_|
|00001f30| 6e 61 6d 65 29 3b 0d 20 | 20 20 20 7d 0d 0d 20 20 |name);. | }.. |
|00001f40| 20 20 69 66 20 28 64 66 | 6c 61 67 29 0d 20 20 20 | if (df|lag). |
|00001f50| 20 7b 0d 09 64 65 66 69 | 6e 65 73 5f 66 69 6c 65 | {..defi|nes_file|
|00001f60| 20 3d 20 66 6f 70 65 6e | 28 64 65 66 69 6e 65 73 | = fopen|(defines|
|00001f70| 5f 66 69 6c 65 5f 6e 61 | 6d 65 2c 20 22 77 22 29 |_file_na|me, "w")|
|00001f80| 3b 0d 09 69 66 20 28 64 | 65 66 69 6e 65 73 5f 66 |;..if (d|efines_f|
|00001f90| 69 6c 65 20 3d 3d 20 30 | 29 0d 09 20 20 20 20 6f |ile == 0|).. o|
|00001fa0| 70 65 6e 5f 65 72 72 6f | 72 28 64 65 66 69 6e 65 |pen_erro|r(define|
|00001fb0| 73 5f 66 69 6c 65 5f 6e | 61 6d 65 29 3b 0d 09 75 |s_file_n|ame);..u|
|00001fc0| 6e 69 6f 6e 5f 66 69 6c | 65 20 3d 20 66 6f 70 65 |nion_fil|e = fope|
|00001fd0| 6e 28 75 6e 69 6f 6e 5f | 66 69 6c 65 5f 6e 61 6d |n(union_|file_nam|
|00001fe0| 65 2c 20 22 77 22 29 3b | 0d 09 69 66 20 28 75 6e |e, "w");|..if (un|
|00001ff0| 69 6f 6e 5f 66 69 6c 65 | 20 3d 3d 20 20 30 29 0d |ion_file| == 0).|
|00002000| 09 20 20 20 20 6f 70 65 | 6e 5f 65 72 72 6f 72 28 |. ope|n_error(|
|00002010| 75 6e 69 6f 6e 5f 66 69 | 6c 65 5f 6e 61 6d 65 29 |union_fi|le_name)|
|00002020| 3b 0d 20 20 20 20 7d 0d | 0d 20 20 20 20 6f 75 74 |;. }.|. out|
|00002030| 70 75 74 5f 66 69 6c 65 | 20 3d 20 66 6f 70 65 6e |put_file| = fopen|
|00002040| 28 6f 75 74 70 75 74 5f | 66 69 6c 65 5f 6e 61 6d |(output_|file_nam|
|00002050| 65 2c 20 22 77 22 29 3b | 0d 20 20 20 20 69 66 20 |e, "w");|. if |
|00002060| 28 6f 75 74 70 75 74 5f | 66 69 6c 65 20 3d 3d 20 |(output_|file == |
|00002070| 30 29 0d 09 6f 70 65 6e | 5f 65 72 72 6f 72 28 6f |0)..open|_error(o|
|00002080| 75 74 70 75 74 5f 66 69 | 6c 65 5f 6e 61 6d 65 29 |utput_fi|le_name)|
|00002090| 3b 0d 0d 20 20 20 20 69 | 66 20 28 72 66 6c 61 67 |;.. i|f (rflag|
|000020a0| 29 0d 20 20 20 20 7b 0d | 09 63 6f 64 65 5f 66 69 |). {.|.code_fi|
|000020b0| 6c 65 20 3d 20 66 6f 70 | 65 6e 28 63 6f 64 65 5f |le = fop|en(code_|
|000020c0| 66 69 6c 65 5f 6e 61 6d | 65 2c 20 22 77 22 29 3b |file_nam|e, "w");|
|000020d0| 0d 09 69 66 20 28 63 6f | 64 65 5f 66 69 6c 65 20 |..if (co|de_file |
|000020e0| 3d 3d 20 30 29 0d 09 20 | 20 20 20 6f 70 65 6e 5f |== 0).. | open_|
|000020f0| 65 72 72 6f 72 28 63 6f | 64 65 5f 66 69 6c 65 5f |error(co|de_file_|
|00002100| 6e 61 6d 65 29 3b 0d 20 | 20 20 20 7d 0d 20 20 20 |name);. | }. |
|00002110| 20 65 6c 73 65 0d 09 63 | 6f 64 65 5f 66 69 6c 65 | else..c|ode_file|
|00002120| 20 3d 20 6f 75 74 70 75 | 74 5f 66 69 6c 65 3b 0d | = outpu|t_file;.|
|00002130| 7d 0d 0d 0d 69 6e 74 0d | 6d 61 69 6e 28 61 72 67 |}...int.|main(arg|
|00002140| 63 2c 20 61 72 67 76 29 | 0d 69 6e 74 20 61 72 67 |c, argv)|.int arg|
|00002150| 63 3b 0d 63 68 61 72 20 | 2a 61 72 67 76 5b 5d 3b |c;.char |*argv[];|
|00002160| 0d 7b 0d 20 20 20 20 73 | 65 74 5f 73 69 67 6e 61 |.{. s|et_signa|
|00002170| 6c 73 28 29 3b 0d 20 20 | 20 20 67 65 74 61 72 67 |ls();. | getarg|
|00002180| 73 28 61 72 67 63 2c 20 | 61 72 67 76 29 3b 0d 20 |s(argc, |argv);. |
|00002190| 20 20 20 6f 70 65 6e 5f | 66 69 6c 65 73 28 29 3b | open_|files();|
|000021a0| 0d 20 20 20 20 72 65 61 | 64 65 72 28 29 3b 0d 20 |. rea|der();. |
|000021b0| 20 20 20 6c 72 30 28 29 | 3b 0d 20 20 20 20 6c 61 | lr0()|;. la|
|000021c0| 6c 72 28 29 3b 0d 20 20 | 20 20 6d 61 6b 65 5f 70 |lr();. | make_p|
|000021d0| 61 72 73 65 72 28 29 3b | 0d 20 20 20 20 76 65 72 |arser();|. ver|
|000021e0| 62 6f 73 65 28 29 3b 0d | 20 20 20 20 6f 75 74 70 |bose();.| outp|
|000021f0| 75 74 28 29 3b 0d 20 20 | 20 20 64 6f 6e 65 28 30 |ut();. | done(0|
|00002200| 29 3b 0d 20 20 20 20 2f | 2a 4e 4f 54 52 45 41 43 |);. /|*NOTREAC|
|00002210| 48 45 44 2a 2f 0d 7d 0d | 00 00 00 00 00 00 00 00 |HED*/.}.|........|
|00002220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002280| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00002290| 2e 33 20 28 42 65 72 6b | 65 6c 65 79 29 20 35 2f |.3 (Berk|eley) 5/|
|000022a0| 31 32 2f 39 30 0d 0d 23 | 50 52 4f 47 3d 09 79 61 |12/90..#|PROG=.ya|
|000022b0| 06 6d 61 69 6e 2e 63 b4 | 02 00 00 00 50 61 72 74 |.main.c.|....Part|
|000022c0| 53 49 54 78 00 00 00 00 | 00 00 00 00 00 01 61 a9 |SITx....|......a.|
|000022d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000022e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000022f0| 00 00 a9 80 16 19 00 00 | 00 00 00 00 01 ac 73 6b |........|......sk|
|00002300| 65 6c 65 74 6f 6e 2e 63 | 20 73 79 6d 74 61 62 2e |eleton.c| symtab.|
|00002310| 63 20 76 65 72 62 6f 73 | 65 2e 63 20 77 61 72 73 |c verbos|e.c wars|
|00002320| 68 61 6c 6c 2e 63 0d 23 | 4d 41 4e 31 3d 09 79 61 |hall.c.#|MAN1=.ya|
|00002330| 63 63 2e 30 20 79 79 66 | 69 78 2e 30 0d 0d 23 62 |cc.0 yyf|ix.0..#b|
|00002340| 65 66 6f 72 65 69 6e 73 | 74 61 6c 6c 3a 0d 23 09 |eforeins|tall:.#.|
|00002350| 69 6e 73 74 61 6c 6c 20 | 2d 63 20 2d 6f 20 24 7b |install |-c -o ${|
|00002360| 42 49 4e 4f 57 4e 7d 20 | 2d 67 20 24 7b 42 49 4e |BINOWN} |-g ${BIN|
|00002370| 47 52 50 7d 20 2d 6d 20 | 24 7b 42 49 4e 4d 4f 44 |GRP} -m |${BINMOD|
|00002380| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 1e 47 88 |...H..Mo|naco..G.|
|00002390| 00 00 00 14 00 06 12 10 | 00 0a 00 00 00 00 01 8d |........|........|
|000023a0| 02 1d 00 13 00 00 00 06 | 00 04 00 50 00 20 01 dd |........|...P. ..|
|000023b0| 02 3d 00 50 00 20 01 dd | 02 3d a5 1f c1 70 00 00 |.=.P. ..|.=...p..|
|000023c0| 20 eb 00 00 20 f1 00 00 | 15 44 01 00 00 00 00 1e | ... ...|.D......|
|000023d0| 00 50 00 20 01 dd 02 3d | 00 50 00 20 01 dd 02 3d |.P. ...=|.P. ...=|
|000023e0| 00 00 15 44 00 00 00 00 | 00 00 00 00 00 00 00 00 |...D....|........|
|000023f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 00 51 |.....n..|.n...>.Q|
|00002400| 36 ac 08 d2 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |6.......|.>..MPSR|
|00002410| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 03 f0 ff ff 00 00 00 4c | 00 57 48 0c 00 00 00 00 |.......L|.WH.....|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+